Hard disks and other mass storage devices are being replaced or supplemented with solid-state mass storage such as flash memories. Flash memories use non-volatile memory cells such as electrically-erasable programmable read-only memory, (EEPROM), but are not randomly accessible at the byte level. Instead, whole pages or sectors of 512 bytes or more are read or written together as a single page. NAND flash memory is commonly used for data storage of blocks. Pages in the same block may have to be erased together, and limitations on writing may exist, such as only being allowed to write each page once between erases.
Program code is often stored in randomly-accessible memory such as a ROM or a NOR flash memory. Since NOR flash memory is byte-addressable, NOR flash can store code that can be executed. Byte-addressing is needed to execute code, since branch and jump instructions may have a target that is at a random location that must be fetched next. The target may be byte-addressable. Since boot routines execute instructions one at a time, rather than a whole page at a time, randomly-accessible memory is needed for boot-code execution.
Small portable devices such as personal digital assistants (PDA), multi-function cell phones, digital cameras, music players, etc. have a central processing unit (CPU) or microcontroller that must be booted just as a PC or host CPU must be booted. These small devices are often quite cost and size sensitive. Having a NOR flash or ROM may increase the size and cost of these portable devices.
NAND flash memory is less expensive than NOR flash memory, and thus preferable from a cost standpoint. NAND flash memory may already be present on some devices such as cell phones or music players as the primary mass storage memory. It is thus desirable to use NAND flash memory to store boot code.
Computers once required a complex series of steps to initialize and make them ready to run programs. Instructions for bootstrapping the computer were loaded into the computer after power-on, such as by manually toggling switches representing the 1's and 0's of bootstrap instructions on the front panel. The computer was brought from a dead state into a useful state, like lifting the computer up by its own bootstraps.
More recently, computers still execute a complex sequence of instructions after power-on to boot the computer and load its operating system (OS). The initial instructions may reside in a read-only memory (ROM), along with a personal computer's Basic Input-Output System (BIOS). The operating system such as Windows may be loaded from the hard disk, and when booting is complete the OS can execute user programs. Various system checks such as peripheral device and memory detection and sizing can be performed during booting.
Both the flash device and the host must be booted at some point in time. Typically, the host is booted from its hard disk before the flash device is inserted into the host. The flash device is then booted when power from the host reaches the flash device.
Cache memories are commonly used by host computers. A cache of the flash memory is desirable. Using this cache memory for booting both the flash-memory device and the external host is also desirable.
What is desired is a flash-memory microcontroller that is bootable from boot code stored in flash memory. It is further desired to boot both the flash microcontroller and the host. A flash microcontroller with a differential interface to the external host that is used to transfer boot code to the external host is also desired.